package com.lusang.market.service.impl;

import com.lusang.basics.service.impl.BaseServiceImpl;
import com.lusang.market.domain.Business;
import com.lusang.market.service.IBusinessService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author dingyom
 * @since 2022-08-25
 */
@Service
public class BusinessServiceImpl extends BaseServiceImpl<Business> implements IBusinessService {
    @Override
    public void add(Business business) {
        business.setClueId(business.getClue().getId());
        business.setProductId(business.getProduct().getId());
        business.setProductName(business.getProduct().getName());
        business.setProductPrice(business.getProduct().getPrice());
        super.add(business);
    }

    @Override
    public void modify(Business business) {
        business.setClueId(business.getClue().getId());
        business.setProductId(business.getProduct().getId());
        business.setProductName(business.getProduct().getName());
        business.setProductPrice(business.getProduct().getPrice());
        super.modify(business);
    }
}
